package cn.sciento.farm.devicemanager.dao.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;

import java.io.Serializable;

/**
 * @author walton
 * @description 报警短信发送结果
 * @date 2020/11/28 14:22
 */
@Data
public class AlarmLogSendResult extends Model<AlarmLogSendResult> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 手机号
     */
    private String phone;

    /**
     * 报警名称
     */
    private String alarmName;
    /**
     * 设备名称
     */
    private String collectionName;

    /**
     * 超过阈值的数据
     */
    private Float actualValue;

    /**
     * 发送状态
     */
    private Integer status;

    /**
     * 余额：剩余可发送短信条数为 0 或 -1 时，改为账户余额不足
     */
    private String balance;

    private Long sendTime;

    private String tenantId;

    private Integer areaId;

    private Integer landId;

    @Override
    protected Serializable pkVal() {
        return super.pkVal();
    }

    @Override
    public String toString() {
        return "AlarmLogSendResult{" +
                "id=" + id +
                ", phone='" + phone + '\'' +
                ", alarmName='" + alarmName + '\'' +
                ", collectionName='" + collectionName + '\'' +
                ", actualValue=" + actualValue +
                ", status=" + status +
                ", balance='" + balance + '\'' +
                ", sendTime=" + sendTime +
                ", tenantId='" + tenantId + '\'' +
                ", landId='" + landId +
                ", areaId='" + areaId +
                '}';
    }
}
